/* 微信小程序通用样式 */
:root {
    --weapp-primary: #07c160;
    --weapp-text: #333333;
    --weapp-text-secondary: #666666;
    --weapp-text-light: #999999;
    --weapp-border: #ebedf0;
    --weapp-bg: #f7f8fa;
    --weapp-card-bg: #ffffff;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: var(--weapp-bg);
    color: var(--weapp-text);
    line-height: 1.4;
    font-size: 14px;
}

/* 微信小程序导航栏 */
.weapp-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: var(--weapp-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--weapp-text);
    z-index: 100;
    padding-top: env(safe-area-inset-top);
}

.weapp-nav::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: var(--weapp-border);
    transform: scaleY(0.5);
}

/* 微信小程序底部标签栏 */
.weapp-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--weapp-card-bg);
    display: flex;
    padding-bottom: env(safe-area-inset-bottom);
}

.weapp-tabbar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 1px;
    background-color: var(--weapp-border);
    transform: scaleY(0.5);
}

.weapp-tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--weapp-text-light);
    padding: 5px 0;
}

.weapp-tabbar-item.active {
    color: var(--weapp-primary);
}

.weapp-tabbar-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

/* 通用容器 */
.weapp-container {
    padding: 12px 16px;
    margin-top: 44px;
    margin-bottom: 50px;
    min-height: calc(100vh - 94px);
}

/* 通用卡片样式 */
.weapp-card {
    background: var(--weapp-card-bg);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

/* 通用按钮样式 */
.weapp-button {
    background: var(--weapp-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    transition: opacity 0.2s;
}

.weapp-button:active {
    opacity: 0.8;
}

/* 通用列表样式 */
.weapp-list {
    background: var(--weapp-card-bg);
    border-radius: 0;
    overflow: hidden;
}

.weapp-list-item {
    position: relative;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    background: var(--weapp-card-bg);
}

.weapp-list-item::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 1px;
    background-color: var(--weapp-border);
    transform: scaleY(0.5);
}

.weapp-list-item:last-child::after {
    display: none;
}

/* 通用表单样式 */
.weapp-form-item {
    margin-bottom: 16px;
}

.weapp-label {
    font-size: 14px;
    color: var(--weapp-text-secondary);
    margin-bottom: 8px;
    display: block;
}

.weapp-input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--weapp-border);
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--weapp-text);
    background: var(--weapp-card-bg);
}

/* 状态栏样式 */
.status-bar {
    height: env(safe-area-inset-top);
    background: var(--weapp-card-bg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* 加载动画 */
.weapp-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--weapp-border);
    border-top-color: var(--weapp-primary);
    border-radius: 50%;
    animation: weapp-spin 0.8s linear infinite;
}

@keyframes weapp-spin {
    to {
        transform: rotate(360deg);
    }
} 